package a.a;

import a.c.ab;
import a.c.d;
import a.c.e;
import a.c.k;
import a.c.q;
import a.c.w;
import a.i.a.c;
import a.i.l;

import java.util.Arrays;

public class hb
{
  public static int a;
  
  public static ab a(q paramq, k paramk)
  {
    return c(paramq, paramk);
  }
  
  public static ab b(q paramq, k paramk)
  {
    ab localab1 = new ab();
    r localr = new r(paramq);
    int i = paramq.j();
    int j = paramq.l();
    ab localab2 = new ab(paramq.w());
    a(localab2, paramk, localr, localab1);
    return localab1;
  }
  
  private static void a(ab paramab1, k paramk, r paramr, ab paramab2)
  {
    int i = m.b;
    boolean bool = m.a;
    paramab1.a(l.f(paramk));
    a.c.m localm = paramab1.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      e locale1 = locald.e();
      e locale2 = locald.f();
      if (i == 0)
      {
        if (!paramr.c(locale1, locale2))
        {
          paramab2.add(locald);
          paramr.a(locale1, locale2);
        }
        localm.f();
      }
    } while (!bool);
  }
  
  public static ab c(q paramq, k paramk)
  {
    int k = m.b;
    boolean bool = m.a;
    ab localab = new ab();
    c localc = new c(paramq);
    double[] arrayOfDouble = new double[paramq.j()];
    Arrays.fill(arrayOfDouble, (1.0D / 0.0D));
    d[] arrayOfd = new d[paramq.j()];
    Object localObject = paramq.v();
    do
    {
      if (!((w)localObject).e()) {
        break;
      }
      localc.a(((w)localObject).d(), (1.0D / 0.0D));
      ((w)localObject).f();
      if ((k == 0) && (bool)) {
        return localab;
      }
    } while (!bool);
    label117:
    do
    {
      e locale;
      int j;
      double d;
      do
      {
        if ((k != 0) || (localc.a())) {
          break;
        }
        localObject = localc.b();
        int i = ((e)localObject).f();
        if (k == 0) {
          if (arrayOfDouble[i] != (1.0D / 0.0D)) {
            localab.add(arrayOfd[i]);
          }
        }
        arrayOfDouble[i] = (-1.0D / 0.0D);
        locald = ((e)localObject).h();
        if (locald != null)
        {
          locale = locald.f();
          j = locale.f();
          d = paramk.getDouble(locald);
        }
        do
        {
          if (bool) {
            break label117;
          }
          if (d < arrayOfDouble[j])
          {
            localc.b(locale, d);
            arrayOfDouble[j] = d;
            arrayOfd[j] = locald;
          }
          locald = locald.i();
          if (!bool) {
            break label177;
          }
          if (k != 0) {
            break label179;
          }
          locald = ((e)localObject).i();
          if (locald == null) {
            break;
          }
          locale = locald.e();
          j = locale.f();
          d = paramk.getDouble(locald);
        } while (k != 0);
      } while (bool);
      if (d < arrayOfDouble[j])
      {
        localc.b(locale, d);
        arrayOfDouble[j] = d;
        arrayOfd[j] = locald;
      }
      d locald = locald.j();
    } while (!bool);
    label177:
    label179:
    return localab;
  }
  
  public static ab a(q paramq)
  {
    int i = m.b;
    boolean bool = m.a;
    ab localab = new ab();
    r localr = new r(paramq);
    a.c.m localm = paramq.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      e locale1 = locald.e();
      e locale2 = locald.f();
      if (i == 0)
      {
        if (!localr.c(locale1, locale2))
        {
          localab.add(locald);
          localr.a(locale1, locale2);
        }
        localm.f();
      }
    } while (!bool);
    return localab;
  }
  
  public static double a(ab paramab, k paramk)
  {
    int i = m.b;
    boolean bool = m.a;
    double d = 0.0D;
    a.c.m localm = paramab.l();
    do
    {
      while (!bool)
      {
        if (!localm.e()) {
          break;
        }
        if (bool) {
          break label67;
        }
        d += paramk.getDouble(localm.a());
        localm.f();
      }
    } while (i != 0);
    label67:
    return d;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.a.hb

 * JD-Core Version:    0.7.0.1

 */